<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>day</title>
    <link rel="stylesheet" href="../font_awesome/css/font-awesome.css">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/day.css">
</head>
<body>
<div class="wrap">
    <div class="fonts">
        <header>daytime</header>

        <!--显示昨晚被杀死或者白天被投票放逐的玩家-->
        <main class="flex-center">
            <img src="../image/cute-cry2.gif" alt="the dead killed last night is crying">
            <div class="text" id="text"></div>
        </main>

        <!--游戏流程-->
        <div class="footer flex-center">
            <div class="speak">发表遗言</div>
            <span class="fa fa-arrow-down"></span>

            <div class="speak">玩家依次发言</div>
            <span class="fa fa-arrow-down"></span>

            <button class="f-btn" id="goNext">去投票</button>
        </div>
    </div>
</div>
<script src="../jQuery/jquery-3.2.1.js"></script>
<script>
    $(document).ready(function () {
        var lastKilled = JSON.parse(sessionStorage.lastKilled);//获取昨晚被杀死玩家的号码

        $("#text").text("昨晚" + (lastKilled+1) + "号玩家被杀死");

        //跳转至“投票”页面
        $("#goNext").click(function () {
            location.href = "vote.html";
        })
    })
</script>
</body>
</html>